Optimal. Leaf size=40 \[ -\frac {\csc ^3(x)}{3}-\frac {1}{8} i \tanh ^{-1}(\cos (x))+\frac {1}{4} i \cot (x) \csc ^3(x)-\frac {1}{8} i \cot (x) \csc (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.15, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.615, Rules used = {3518, 3108, 3107, 2606, 30, 2611, 3768, 3770} \[ -\frac {\csc ^3(x)}{3}-\frac {1}{8} i \tanh ^{-1}(\cos (x))+\frac {1}{4} i \cot (x) \csc ^3(x)-\frac {1}{8} i \cot (x) \csc (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2606
Rule 2611
Rule 3107
Rule 3108
Rule 3518
Rule 3768
Rule 3770
Rubi steps
\begin {align*} \int \frac {\csc ^5(x)}{i+\tan (x)} \, dx &=\int \frac {\cot (x) \csc ^4(x)}{i \cos (x)+\sin (x)} \, dx\\ &=-\left (i \int \cot (x) \csc ^4(x) (\cos (x)+i \sin (x)) \, dx\right )\\ &=-\left (i \int \left (i \cot (x) \csc ^3(x)+\cot ^2(x) \csc ^3(x)\right ) \, dx\right )\\ &=-\left (i \int \cot ^2(x) \csc ^3(x) \, dx\right )+\int \cot (x) \csc ^3(x) \, dx\\ &=\frac {1}{4} i \cot (x) \csc ^3(x)+\frac {1}{4} i \int \csc ^3(x) \, dx-\operatorname {Subst}\left (\int x^2 \, dx,x,\csc (x)\right )\\ &=-\frac {1}{8} i \cot (x) \csc (x)-\frac {\csc ^3(x)}{3}+\frac {1}{4} i \cot (x) \csc ^3(x)+\frac {1}{8} i \int \csc (x) \, dx\\ &=-\frac {1}{8} i \tanh ^{-1}(\cos (x))-\frac {1}{8} i \cot (x) \csc (x)-\frac {\csc ^3(x)}{3}+\frac {1}{4} i \cot (x) \csc ^3(x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.02, size = 139, normalized size = 3.48 \[ -\frac {1}{12} \tan \left (\frac {x}{2}\right )-\frac {1}{12} \cot \left (\frac {x}{2}\right )+\frac {1}{64} i \csc ^4\left (\frac {x}{2}\right )-\frac {1}{32} i \csc ^2\left (\frac {x}{2}\right )-\frac {1}{64} i \sec ^4\left (\frac {x}{2}\right )+\frac {1}{32} i \sec ^2\left (\frac {x}{2}\right )+\frac {1}{8} i \log \left (\sin \left (\frac {x}{2}\right )\right )-\frac {1}{8} i \log \left (\cos \left (\frac {x}{2}\right )\right )-\frac {1}{24} \cot \left (\frac {x}{2}\right ) \csc ^2\left (\frac {x}{2}\right )-\frac {1}{24} \tan \left (\frac {x}{2}\right ) \sec ^2\left (\frac {x}{2}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.47, size = 121, normalized size = 3.02 \[ \frac {{\left (-3 i \, e^{\left (8 i \, x\right )} + 12 i \, e^{\left (6 i \, x\right )} - 18 i \, e^{\left (4 i \, x\right )} + 12 i \, e^{\left (2 i \, x\right )} - 3 i\right )} \log \left (e^{\left (i \, x\right )} + 1\right ) + {\left (3 i \, e^{\left (8 i \, x\right )} - 12 i \, e^{\left (6 i \, x\right )} + 18 i \, e^{\left (4 i \, x\right )} - 12 i \, e^{\left (2 i \, x\right )} + 3 i\right )} \log \left (e^{\left (i \, x\right )} - 1\right ) + 6 i \, e^{\left (7 i \, x\right )} + 106 i \, e^{\left (5 i \, x\right )} - 22 i \, e^{\left (3 i \, x\right )} + 6 i \, e^{\left (i \, x\right )}}{24 \, {\left (e^{\left (8 i \, x\right )} - 4 \, e^{\left (6 i \, x\right )} + 6 \, e^{\left (4 i \, x\right )} - 4 \, e^{\left (2 i \, x\right )} + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.20, size = 62, normalized size = 1.55 \[ -\frac {1}{64} i \, \tan \left (\frac {1}{2} \, x\right )^{4} - \frac {1}{24} \, \tan \left (\frac {1}{2} \, x\right )^{3} - \frac {50 i \, \tan \left (\frac {1}{2} \, x\right )^{4} + 24 \, \tan \left (\frac {1}{2} \, x\right )^{3} + 8 \, \tan \left (\frac {1}{2} \, x\right ) - 3 i}{192 \, \tan \left (\frac {1}{2} \, x\right )^{4}} + \frac {1}{8} i \, \log \left (\tan \left (\frac {1}{2} \, x\right )\right ) - \frac {1}{8} \, \tan \left (\frac {1}{2} \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.19, size = 58, normalized size = 1.45 \[ -\frac {\tan \left (\frac {x}{2}\right )}{8}-\frac {i \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{64}-\frac {\left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{24}-\frac {1}{24 \tan \left (\frac {x}{2}\right )^{3}}+\frac {i}{64 \tan \left (\frac {x}{2}\right )^{4}}+\frac {i \ln \left (\tan \left (\frac {x}{2}\right )\right )}{8}-\frac {1}{8 \tan \left (\frac {x}{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.51, size = 83, normalized size = 2.08 \[ -\frac {{\left (\frac {8 \, \sin \relax (x)}{\cos \relax (x) + 1} + \frac {24 \, \sin \relax (x)^{3}}{{\left (\cos \relax (x) + 1\right )}^{3}} - 3 i\right )} {\left (\cos \relax (x) + 1\right )}^{4}}{192 \, \sin \relax (x)^{4}} - \frac {\sin \relax (x)}{8 \, {\left (\cos \relax (x) + 1\right )}} - \frac {\sin \relax (x)^{3}}{24 \, {\left (\cos \relax (x) + 1\right )}^{3}} - \frac {i \, \sin \relax (x)^{4}}{64 \, {\left (\cos \relax (x) + 1\right )}^{4}} + \frac {1}{8} i \, \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.70, size = 57, normalized size = 1.42 \[ -\frac {\mathrm {tan}\left (\frac {x}{2}\right )}{8}+\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\,1{}\mathrm {i}}{8}-\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+\frac {2\,\mathrm {tan}\left (\frac {x}{2}\right )}{3}-\frac {1}{4}{}\mathrm {i}}{16\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{24}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^4\,1{}\mathrm {i}}{64} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\csc ^{5}{\relax (x )}}{\tan {\relax (x )} + i}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________